from likeshop.base.mybase import Tools


# 获取商品列表
class get_product_list_model(Tools):
    # 定义登录路径
    path = '/page/goods/getGoodsList'

    # 发送登录请求
    def get_product_list_action(self, proid, key, asc, desc):
        mydata = {
            'category_id': proid,
            'keyword': key,
            'sales_sum': asc,
            'price': desc
        }
        res = self.session.get(url=self.hosturl+self.path, params=mydata)
        return res.json()
